// components/base/panel-container/index.js
const { navTo } = require('../../../common/env');
Component({
    /**
     * 组件的属性列表
     */
    properties: {
        title: {
            type: String,
            value: 'PanelContainer',
        },
        isLink: {
            type: Boolean,
            value: false,
        },
        isCenter: {
            type: Boolean,
            value: false,
        },
        link: String,
        rightText: {
            type: String,
            value: '',
        },
        rightBold: {
            type: Boolean,
            value: true,
        },
        rightStyle: {
            type: String,
            value: '',
        },
    },

    /**
     * 组件的初始数据
     */
    data: {

    },

    /**
     * 组件的方法列表
     */
    methods: {
        clickAction: function () {
            const { link, isLink } = this.data;
            if (link && isLink) {
                navTo(link);
            }
        },
        rightAction: function () {
            this.triggerEvent('right')
        },
    }
})
